@extends('_layouts.default')

@section('css')

@stop

@section('main')
<div class="am-g am-g-fixed my-main">
    <div class="am-g am-margin">
        <div class="am-u-md-offset-3 am-u-md-6">
            <div class="am-tabs" data-am-tabs>
              <ul class="am-tabs-nav am-nav am-nav-tabs">
                <li class="am-active"><a href="javascript: void(0)">我要登录</a></li>
                <li><a href="javascript: void(0)">我要注册</a></li>
              </ul>

              <div class="am-tabs-bd">
                <div class="am-tab-panel am-active">
                    @if(Session::has('message'))
                        <div class="am-alert am-alert-{{Session::get('message')['type']}} am-margin am-text-center" data-am-alert>{{Session::get('message')['content']}}</div>
                    @endif
                    @if($errors->has())
                        <div class="am-alert am-alert-danger am-margin am-text-center" data-am-alert>{{$errors->first()}}</div>
                    @endif
                    {{Form::open(array('url'=>'user/dologin','method'=>'post'))}}
                    <div class="am-input-group  am-margin">
                      <span class="am-input-group-label"><i class="am-icon-user am-icon-fw"></i></span>
                      {{Form::text('email',Input::old('email'),array('class'=>'am-form-field','placeholder'=>'邮箱或用户名'))}}
                    </div>
                    <div class="am-input-group am-margin">
                      <span class="am-input-group-label"><i class="am-icon-lock am-icon-fw"></i></span>
                      {{Form::password('password',array('class'=>'am-form-field','placeholder'=>'密码'))}}
                    </div>
                    <div class="am-input-group am-margin">
                      <label>{{Form::checkbox('remember_me',1)}}&nbsp;记住我的登录信息</label>
                    </div>
                    <div class="am-margin">
                        {{Form::submit('登录',array('class'=>'am-btn am-btn-primary am-btn-block'))}}
                    </div>
                    {{Form::close()}}
                    <div class="am-margin" >
                      <a href="{{URL::to('password/remind')}}" class="am-fl">忘记登录密码？</a>
                      <a href="{{URL::to('user/register')}}" class="am-fr">注册新帐号</a>
                    </div>
                </div>
                <div class="am-tab-panel">
                    @if(Session::has('message'))
                        <div class="am-alert am-alert-{{Session::get('message')['type']}} am-margin am-text-center" data-am-alert>{{Session::get('message')['content']}}</div>
                    @endif
                    @if($errors->has())
                        <div class="am-alert am-alert-danger am-margin am-text-center" data-am-alert>{{$errors->first()}}</div>
                    @endif
                    {{Form::open(array('url'=>'user/doregister','method'=>'post'))}}
                    <div class="am-input-group  am-margin">
                      <span class="am-input-group-label"><i class="am-icon-envelope-o am-icon-fw"></i></span>
                      {{Form::email('email',Input::old('email'),array('class'=>'am-form-field','placeholder'=>'邮箱'))}}
                    </div>
                    <div class="am-input-group  am-margin">
                      <span class="am-input-group-label"><i class="am-icon-user am-icon-fw"></i></span>
                      {{Form::text('username',Input::old('username'),array('class'=>'am-form-field','placeholder'=>'用户名'))}}
                    </div>
                    <div class="am-input-group am-margin">
                      <span class="am-input-group-label"><i class="am-icon-lock am-icon-fw"></i></span>
                      {{Form::password('password',array('class'=>'am-form-field','placeholder'=>'密码'))}}
                    </div>
                    <div class="am-input-group am-margin">
                      <span class="am-input-group-label"><i class="am-icon-unlock-alt am-icon-fw"></i></span>
                      {{Form::password('password_confirmation',array('class'=>'am-form-field','placeholder'=>'确认密码'))}}
                    </div>
                    <div class=" am-margin">
                        {{Form::submit('注册',array('class'=>'am-btn am-btn-primary am-btn-block'))}}
                    </div>
                    {{Form::close()}}
                    <div class="am-margin" >
                      <a href="{{URL::to('user/login')}}" class="am-text-center am-block">已有账号，点击登录</a>
                    </div>
                </div>
              </div>
            </div>
        </div>
    </div>
</div>
@stop

@section('js')

@stop